Skip to content

Conversation

wilhelsr
Copy link
Member

Purpose

Improve catalogue browsing and reduce unnecessary data fetching, rendering, and image processing. Give users control over navigation and component replacement, with clear feedback and recovery from failed requests.

Changes

  • Keep users in the catalogue after adding a component, with a compact success notification and an optional View build action.
  • Ask for confirmation before replacing an existing component, showing the current and proposed parts with images.
  • Reuse the success notification for component removal.
  • Add Try again for failed catalogue requests, preserving filters, pagination, and previously loaded results.
  • Restore the page’s default category when resetting filters on desktop and mobile.
  • Fetch catalogue summaries first and load full specifications when opening details or adding a part to the build.
  • Retain specifications in mounted cards so opening details and subsequently adding the part avoids another request.
  • Lazy-load catalogue images and use one shared detail dialog per preview instead of a dialog for every card.
  • Memoize unchanged cards and keep previous results visible during loading.
  • Reserve space for the result count to prevent layout jumps.
  • Cache catalogue responses for one minute, with a maximum of 100 cached pages.
  • Request WebP output when cropping mobile detail images instead of allowing canvas to default to PNG.
  • Adjust mobile detail titles to avoid overlapping the close button.
  • Update the README’s accessibility, sustainability, and current-prototype descriptions.

Related issues

Closes #98
Closes #101

Testing

  • npm --prefix frontend test — 24 tests passed.
  • npm --prefix frontend run build — passed.
  • Targeted ESLint checks passed for changed application and test files during implementation. A full-project lint run was not recorded.
  • Automated coverage includes cached-result reuse and expiry, specification reuse, unchanged-card rendering, retrying failed requests with the same parameters, and pagination without duplicated results.
  • Before/after React Profiler recordings showed fewer commits in the recorded browsing interaction. This is not a measured overall speed improvement.
  • Browser Network screenshots confirmed that cropped mobile images changed from data:image/png to data:image/webp.
  • A complete manual pass of the final interactions on both mobile and desktop remains to be recorded.

Screenshots

image image image

Checklist

  • I have reviewed my own changes.
  • The changes meet the linked issues’ acceptance criteria, where applicable.
  • I have run automated checks and recorded the results above.
  • I have added or updated tests where needed.
  • I have updated documentation where needed.
  • I have verified the final interactions on mobile and desktop.
  • I have included screenshots for visual changes, or marked them not applicable.

…n the buil, also implemented fetching specifications only when needed (add, partview), and added lazy loading of images
… dialog is shared over all parts instead of one for each part.
…, also fix a bug wher if part details where fetched when showing details they were lost when exiting that dialog
…same filters within a minute will now fetch data from a cache instead of the backend.
@wilhelsr wilhelsr added the enhancement New feature or request label Nov 12, 2026
@wilhelsr wilhelsr requested a review from a team as a code owner November 12, 2026 17:55
@krgjert krgjert added this to the 4. underveisinnlevering milestone Nov 12, 2026
Copy link
Member

@krgjert krgjert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, makes it better for users and better user experience!

@krgjert krgjert merged commit 12fcd5b into dev Nov 12, 2026
@krgjert krgjert deleted the 101-improve-catalog-interactions-and-usability branch November 12, 2026 18:00
Sign in to join this conversation on GitHub.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants